package top.gcl.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import top.gcl.model.JsonResult;

@RestController
public class LoginCtrl {
    //@PostMapping(value="/login")
    @RequestMapping(value = "/login" ,method = {RequestMethod.POST})
    //或者用 @PostMapping 它等同于 @RequestMapping(value = "/login" ,method = {RequestMethod.POST})
    public JsonResult login(String username,String password){
        System.out.println("username："+username);
        System.out.println("password："+password);

        JsonResult res=new JsonResult (0 , "登陆成功");
        return res;
    }

}
